var _tools = require("../../../utils/tools.js"), _tools2 = _interopRequireDefault(_tools);

function _interopRequireDefault(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}

var that, app = getApp();

Page({
    data: {
        type: 1
    },
    onLoad: function(t) {
        that = this, t.type && (this.data.type = t.type), this.setData({
            title: 1 == this.data.type ? "活动规则" : "常见问题"
        });
    },
    onReady: function() {
        wx.setNavigationBarColor({
            frontColor: "#000000",
            backgroundColor: "#000000"
        });
        var t = {
            action: "rule",
            contr: "index",
            token: wx.getStorageSync("token"),
            type: this.data.type
        };
        _tools2.default.request(t, function(t) {
            that.setData(t.info);
        });
    },
    onShow: function() {},
    onShareAppMessage: function() {
        return {
            title: this.data.share.text,
            imageUrl: this.data.share.images,
            path: "bh_bargain/pages/index/index?parent_id=" + this.data.share.member_id
        };
    }
});